home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Go64!
/
Go64_1998-04_1998_CSW_Side_B.d64
/
demo2 .mbs
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
979b
|
41 lines
10 rem *** midibasic empfangsdemo ***
20 rem
30 rem *** gibt noteninfo und sysex-
40 rem *** daten auf dem bildschirm aus
50 rem
60 rem *** w : wellenform
70 rem *** a,k,v : empfangene daten
80 rem *** p : pulsbreite
90 rem *** s : hilfsvar. fuer pwm
100 rem
110 w=64
120 (NULL):(NULL) 15:(NULL) 1,0,0,15,0:(NULL) 1,w:(NULL) 1,16
130 (NULL):print chr$(14)
140 (NULL):p=1:s=0
150 a=usr(0)
160 if s=0 then p=p+.25:if p>15 then s=1
170 if s=1 then p=p-.25:if p< 1 then s=0:p=1
180 (NULL) 1,p*16
190 if a=255 then 150
200 if int(a/16)=8 then k=usr(0):v=usr(0):print"[206]oteoff [203]ey"k"[214]el"v:goto 350
210 if int(a/16)=9 then k=usr(0):v=usr(0):print"[206]oteon [203]ey"k"[214]el"v:goto 390
220 if int(a/16)<8 then k=a:v=usr(0):print" [203]ey"k"[214]el"v
230 if a>239 and a<248 then print"[211]ystem [197]xclusive":goto 280
240 goto150
250 rem
260 rem *** sysex ***
270 rem
280 z=0
290 a=usr(0):if a=255 then 290
300 if a>127 then print"[197]nd of [211]ys[197]x, [210]eceived [196]ata:"z"[194]ytes":goto 120
310 z=z+1:print"[196]ata ";a:goto 290
320 rem
330 rem *** noteoff ***
340 rem
350 for z=1 to 3:(NULL) z,w:next:goto 150
360 rem
370 rem *** noteon ***
380 rem
390 for z=1 to 3:if k<95 then :(NULL) z,k:(NULL) z,w+1
400 goto 150